<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>商品删除</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
</head>
<body>

<div class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
		<label class="layui-form-label">订单号：</label>
        <label class="  layui-gray" style="text-align:left; padding-left:0px;" id="orderid"></label>
	</div>
    <div class="layui-form-item">
        <label class="layui-form-label">完成备注：</label>
        <div class="layui-input-inline">
            <textarea id="note" name="note" placeholder="请输入内容" class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <input style="margin-left: 111px;"
               class="layui-btn layui-btn-primary layui-btn-xs"
               type="button" lay-submit lay-filter="LAY-user-front-submit"
               id="LAY-user-back-submit" value="确认">
    </div>
</div>
<script src="/layui/jquery.min.js"></script>
<script src="/layui/layui.js"></script>
<script>
    var orderNo=parent.orderNo;
    var orderId=parent.orderId;
    $(function () {
        $("#orderid").html(orderNo)
    });
    $("#LAY-user-back-submit").click(function () {
        var remark=$("#note").val();
        $.ajax({
            url: '/goods?url=Order%2FupOrderStatus&orderId='+orderId+'&remark='+remark+'',
            type: 'post',
            dataType: 'json',
            contentType: 'application/json',
            async: false,
            success: function(data){
                //alert(JSON.stringify(data));
                if(data.code=="000000"){
                    // alert("成功！");
                    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                    parent.layer.close(index); //再执行关闭
                    parent.SelectData();//重载刷新
                }else {
                    alert(data.errorDetail);
                }
            }
        });
    });
    layui.config({
        base: '/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form'], function(){
        var $ = layui.$
            ,form = layui.form ;
    })
</script>
</body>
</html>